home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
011-020
/
amok13
/
compcontrol
/
ccinitwin.mod
< prev
next >
Wrap
Text File
|
1993-11-04
|
6KB
|
193 lines
(*--------------------------------------------------------------------------
:Program. CCInitWin.DEF
:Author. Ralf Kaiser
:Address. 5600 Wuppertal 2, Winckelmannstr. 1
:Phone, 02 02/59 28 10
:Shortcut. [rk]
:Version. 2.1
:Date. 21.01.89
:Copyright. Public Domain
:Language. Modula 2
:Translator. M2 AMIGA Version 3.2d
:Imports. InitStruct, Nicolas Benezan [bne]
:Contents. Initialisiert das Window für CompControl
----------------------------------------------------------------------------*)
IMPLEMENTATION MODULE CCInitWin;
FROM SYSTEM IMPORT
LONGSET, ADR, ADDRESS;
FROM Arts IMPORT
Assert, TermProcedure;
FROM Intuition IMPORT
GadgetFlags, GadgetFlagSet, ActivationFlags, ActivationFlagSet,
boolGadget, strGadget, Gadget, GadgetPtr, StringInfo, IntuiText, Border,
IDCMPFlags, IDCMPFlagSet, IntuiMessage, IntuiMessagePtr, WindowFlags,
WindowFlagSet, ScreenFlags, ScreenFlagSet, customScreen, NewWindow,
WindowPtr, OpenWindow, CloseWindow, RefreshGadgets;
FROM Graphics IMPORT
RastPortPtr, Move, Text, jam1, jam2;
FROM MemSystem IMPORT
AllocMem, Deallocate;
FROM IntuiStruct IMPORT
StructWindow, StructText, StructGadget, StructString, StructBorder,
Rectangle, BorderEnd, AllocProc, DeallocProc;
PROCEDURE Cleanup;
BEGIN
IF MainWin # NIL THEN CloseWindow (MainWin); END;
END Cleanup;
PROCEDURE MakeMainWindow (VAR NewWin : NewWindow);
BEGIN
(* ---- Borders erzeugen ---- *);
StructBorder (MainBorder [0], -1, -1, PEN3, jam1, 4, NIL);
Rectangle (101, 17);
BorderEnd;
StructBorder (MainBorder [1], -1, -1, PEN3, jam1, 4, NIL);
Rectangle (416, 10);
BorderEnd;
StructBorder (MainBorder [2], -1, -1, PEN3, jam1, 4, NIL);
Rectangle (416, 17);
BorderEnd;
StructBorder (MainBorder [3], -1, -1, PEN3, jam1, 4, NIL);
Rectangle (205, 17);
BorderEnd;
(* ---- Intuitexte erzeugen ---- *)
StructText (MainTexte [0], PEN1, PEN0, jam1, 5, 5, ADR(EDITT), NIL);
StructText (MainTexte [1], PEN1, PEN0, jam1, 5, 5, ADR(COMPT), NIL);
StructText (MainTexte [2], PEN1, PEN0, jam1, 5, 5, ADR(LINKT), NIL);
StructText (MainTexte [3], PEN1, PEN0, jam1, 5, 5, ADR(STARTT), NIL);
StructText (MainTexte [4], PEN1, PEN0, jam1, 5, 5, ADR(ALLTX), NIL);
StructText (MainTexte [5], PEN1, PEN0, jam1, 5, 5, ADR(EXT1T), NIL);
StructText (MainTexte [6], PEN1, PEN0, jam1, 5, 5, ADR(EXT2T), NIL);
StructText (MainTexte [7], PEN1, PEN0, jam1, 5, 5, ADR(DOITT), NIL);
StructText (MainTexte [8], PEN1, PEN0, jam1, 5, 5, ADR(ABOUTT), NIL);
StructText (MainTexte [9], PEN1, PEN0, jam1, 5, 5, ADR(FREQT), NIL);
StructText (MainTexte [10], PEN1, PEN0, jam1, 5, 5, ADR(QUITT), NIL);
(* ---- StringInfostruktur erzeugen ---- *)
StructString (MainString, NameSIBuff, UNDOBUFFER);
(* ---- Gadgetstrukturen erzeugen ---- *)
StructGadget (MainGadgets [0], 5, 5, 100, 16,
GadgetFlagSet{}, ActivationFlagSet{relVerify},
boolGadget, ADR(MainBorder [0]),
ADR(MainTexte [0]), LONGSET{}, EDITG,
NIL);
StructGadget (MainGadgets [1], 110, 5, 100, 16,
GadgetFlagSet{}, ActivationFlagSet{relVerify},
boolGadget, ADR(MainBorder [0]),
ADR(MainTexte [1]), LONGSET{}, COMPG,
ADR(MainGadgets [0]));
StructGadget (MainGadgets [2], 215, 5, 100, 16,
GadgetFlagSet{}, ActivationFlagSet{relVerify},
boolGadget, ADR(MainBorder [0]),
ADR(MainTexte [2]), LONGSET{}, LINKG,
ADR(MainGadgets [1]));
StructGadget (MainGadgets [3], 320, 5, 100, 16,
GadgetFlagSet{}, ActivationFlagSet{relVerify},
boolGadget, ADR(MainBorder [0]),
ADR(MainTexte [3]), LONGSET{}, START,
ADR(MainGadgets [2]));
StructGadget (MainGadgets [4], 5, 26, 415, 10,
GadgetFlagSet{selected},
ActivationFlagSet{relVerify, stringCenter},
strGadget, ADR(MainBorder [1]),
NIL, LONGSET{}, NAMEG,
ADR(MainGadgets [3]));
MainGadgets [4].specialInfo := ADR(MainString);
StructGadget (MainGadgets [5], 5, 41, 415, 16,
GadgetFlagSet{}, ActivationFlagSet{relVerify},
boolGadget, ADR(MainBorder [2]),
ADR(MainTexte [4]), LONGSET{}, ALLGA,
ADR(MainGadgets [4]));
StructGadget (MainGadgets [6], 5, 62, 205, 16,
GadgetFlagSet{}, ActivationFlagSet{relVerify},
boolGadget, ADR(MainBorder [3]),
ADR(MainTexte [5]), LONGSET{}, EXT1G,
ADR(MainGadgets [5]));
StructGadget (MainGadgets [7], 215, 62, 205, 16,
GadgetFlagSet{}, ActivationFlagSet{relVerify},
boolGadget, ADR(MainBorder [3]),
ADR(MainTexte [6]), LONGSET{}, EXT2G,
ADR(MainGadgets [6]));
StructGadget (MainGadgets [8], 5, 83, 100, 16,
GadgetFlagSet{}, ActivationFlagSet{relVerify},
boolGadget, ADR(MainBorder [0]),
ADR(MainTexte [7]), LONGSET{}, DOITG,
ADR(MainGadgets [7]));
StructGadget (MainGadgets [9], 110, 83, 100, 16,
GadgetFlagSet{}, ActivationFlagSet{relVerify},
boolGadget, ADR(MainBorder [0]),
ADR(MainTexte [8]), LONGSET{}, ABOUT,
ADR(MainGadgets [8]));
StructGadget (MainGadgets [10], 215, 83, 100, 16,
GadgetFlagSet{}, ActivationFlagSet{relVerify},
boolGadget, ADR(MainBorder [0]),
ADR(MainTexte [9]), LONGSET{}, FREQG,
ADR(MainGadgets [9]));
StructGadget (MainGadgets [11], 320, 83, 100, 16,
GadgetFlagSet{}, ActivationFlagSet{relVerify},
boolGadget, ADR(MainBorder [0]),
ADR(MainTexte [10]), LONGSET{}, QUITG,
ADR(MainGadgets [10]));
(* ---- NewWindowstruktur erzeugen ---- *)
StructWindow (NewWin, 0, 0, 460, 120, PEN0, PEN1,
IDCMPFlagSet{ gadgetUp},
WindowFlagSet{activate, windowDepth, gimmeZeroZero, windowDrag},
ADR(MAINTITEL),
NIL, ScreenFlagSet{wbenchScreen});
NewWin.firstGadget := ADR(MainGadgets [11]);
END MakeMainWindow;
BEGIN
TermProcedure (Cleanup);
AllocProc := AllocMem;
DeallocProc := Deallocate;
END CCInitWin.